package qlttn.business;

import java.util.ArrayList;
import java.util.List;

import qlttn.common.valueobjects.QuestionVO;
import qlttn.dao.daointerface.EditorExamQuestionDAO;
import qlttn.dao.daointerface.EditorExamQuestionDAOImpl;
import qlttn.model.Choice;
import qlttn.model.ExamQuestion;
import qlttn.model.Images;
import qlttn.model.MultiChoiceQuestion;
import qlttn.model.TrueFalseQuestion;

public class EditorExamQuestionBOImpl extends EditorExamQuestionDAOImpl implements EditorExamQuestionBO {
	private EditorExamQuestionDAO editorExamQuestionDAO;
	
	public EditorExamQuestionBOImpl(){
		editorExamQuestionDAO = new EditorExamQuestionDAOImpl();
	}
	
	//load exam question
		public List<QuestionVO> loadExamQuestion(int examQID){
			return editorExamQuestionDAO.loadExamQuestion(examQID);
		}
		
		//load Question
		public List<QuestionVO> loadQuestion(int courseId, int groupId, String kindOf, String level){
			List<QuestionVO> listQuestion = new ArrayList<QuestionVO>();
			listQuestion = editorExamQuestionDAO.loadQuestion(courseId, groupId, kindOf, level);
			return listQuestion;
		}


		//load choices
		public List<Choice> loadListChoice(int idMutil){
			return editorExamQuestionDAO.loadListChoice(idMutil);
		}

		//Load Images
		public Images loadImage(int idQuestion){
			return editorExamQuestionDAO.loadImage(idQuestion);
		}
		
		//Load Multi Choice Question
		public MultiChoiceQuestion loadMultiQuestion(int questionID){
			return editorExamQuestionDAO.loadMultiQuestion(questionID);
		}
		
		//Load True False Question
		public TrueFalseQuestion loadTrueFalseQuestion(int questionID){
			return editorExamQuestionDAO.loadTrueFalseQuestion(questionID);
		}
		
		//Save Exam Question
		public boolean saveExamQuestion(ExamQuestion examQuestion){
			return editorExamQuestionDAO.saveExamQuestion(examQuestion);
			
		}
}
